package com.qiantu.api.entity;

import com.qiantu.api.BuildConfig;
import com.qiantu.api.utils.ThemeUtil;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class LinkageBean {

    private String linkageSerialNo;
    private String name;
    private int decideType;
    private String houseSerialNo;
    private int linkType;
    private String roomSerialNo;

    private boolean isDisable;
    private int linkageSateType;
    private boolean isHide;
    private List<LinkageCondition> linkageConditions;
    private List<LinkageTask> linkageTasks;

    public String getLinkageSerialNo() {
        return linkageSerialNo;
    }

    public void setLinkageSerialNo(String serialNo) {
        this.linkageSerialNo = serialNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getDecideType() {
        return decideType;
    }

    public void setDecideType(int decideType) {
        this.decideType = decideType;
    }

    public String getHouseSerialNo() {
        return houseSerialNo;
    }

    public void setHouseSerialNo(String houseSerialNo) {
        this.houseSerialNo = houseSerialNo;
    }

    public int getLinkType() {
        return linkType;
    }

    public void setLinkType(int linkType) {
        this.linkType = linkType;
    }

    public String getRoomSerialNo() {
        return roomSerialNo;
    }

    public void setRoomSerialNo(String roomSerialNo) {
        this.roomSerialNo = roomSerialNo;
    }

    public boolean isIsDisable() {
        return isDisable;
    }

    public void setIsDisable(boolean isDisable) {
        this.isDisable = isDisable;
    }

    public int getLinkageSateType() {
        return linkageSateType;
    }

    public void setLinkageSateType(int linkageSateType) {
        this.linkageSateType = linkageSateType;
    }

    public boolean isIsHide() {
        return isHide;
    }

    public void setIsHide(boolean isHide) {
        this.isHide = isHide;
    }

    public List<LinkageCondition> getLinkageConditions() {
        return linkageConditions;
    }

    public void setLinkageConditions(List<LinkageCondition> linkageConditions) {
        this.linkageConditions = linkageConditions;
    }

    public List<LinkageTask> getLinkageTasks() {
        return linkageTasks;
    }

    public void setLinkageTasks(List<LinkageTask> linkageTasks) {
        this.linkageTasks = linkageTasks;
    }

    public static class LinkageCondition {
        private String conditionSerialNo;
        private String linkageSettingsId;
        private String briefing;
        private String imageUrl;
        private int conditionType;
        private int decideType;
        private int sort;
        //室内:1、外:2
        private int areaType;
        private String areaCoding;
        private String areaName;
        //定时
        private int minute;
        private int hour;
        private int toMinute;
        private int toHour;
        private boolean monday;
        private boolean tuesday;
        private boolean wednesday;
        private boolean thursday;
        private boolean friday;
        private boolean saturday;
        private boolean sunday;
        //定时类型：0不循环、1循环
        private int timingType;
        private int timeTypeId;
        private boolean isReverse;

        //设备环境、设备状态
        private String deviceSerialNo;
        private String stateName;
        private String stateValue;
        //逻辑类型：1小于、2等于、3大于,4范围
        private int logicType;
        private int beginValue;
        private int endValue;
        //空气质量 // 1优、2良、3差
        private int ariGradeType;
        //位置
        private double longitude;
        private double latitude;
        private int scopeLong;
        //太阳的位置类型：1日出、2日落
        private int sunPositionType;
        //日出 ,日落前后时间
        private int timeLong;
//        //天气类型
//        private int weatherTypeXor;
//        //天气类型子类
//        private int weatherChildrenTypeXor;
        //[{"name": "晴天","value": "0"}]
        private int sunTypeId;
        private int toSunTypeId;
        private List<WeatherValueBean> weatherKeyValue;
        private int conditionTypeId;
        private int actionTypeId;
        private int operatorTypeId;
        private int groupNum;

        public String getConditionSerialNo() {
            return conditionSerialNo;
        }

        public void setConditionSerialNo(String conditionSerialNo) {
            this.conditionSerialNo = conditionSerialNo;
        }

        public String getLinkageSettingsId() {
            return linkageSettingsId;
        }

        public void setLinkageSettingsId(String linkageSettingsId) {
            this.linkageSettingsId = linkageSettingsId;
        }

        public String getBriefing() {
            return briefing;
        }

        public void setBriefing(String briefing) {
            this.briefing = briefing;
        }

        public String getImageUrl() {
            return BuildConfig.APP_RESOURCE_BASE + ThemeUtil.getIconThemeSuffix() + imageUrl + "_linkage.png";
        }

        public String getBaseImageUrl() {
            return imageUrl;
        }
        public void setImageUrl(String imageUrl) {
            this.imageUrl = imageUrl;
        }

        public int getConditionType() {
            return conditionType;
        }

        public void setConditionType(int conditionType) {
            this.conditionType = conditionType;
        }

        public int getDecideType() {
            return decideType;
        }

        public void setDecideType(int decideType) {
            this.decideType = decideType;
        }

        public int getSort() {
            return sort;
        }

        public void setSort(int sort) {
            this.sort = sort;
        }

        public int getAreaType() {
            return areaType;
        }

        public void setAreaType(int areaType) {
            this.areaType = areaType;
        }

        public String getAreaCoding() {
            return areaCoding;
        }

        public void setAreaCoding(String areaCoding) {
            this.areaCoding = areaCoding;
        }

        public String getAreaName() {
            return areaName;
        }

        public void setAreaName(String areaName) {
            this.areaName = areaName;
        }

        public int getMinute() {
            return minute;
        }

        public void setMinute(int minute) {
            this.minute = minute;
        }

        public int getHour() {
            return hour;
        }

        public void setHour(int hour) {
            this.hour = hour;
        }

        public boolean isMonday() {
            return monday;
        }

        public void setMonday(boolean monday) {
            this.monday = monday;
        }

        public boolean isTuesday() {
            return tuesday;
        }

        public void setTuesday(boolean tuesday) {
            this.tuesday = tuesday;
        }

        public boolean isWednesday() {
            return wednesday;
        }

        public void setWednesday(boolean wednesday) {
            this.wednesday = wednesday;
        }

        public boolean isThursday() {
            return thursday;
        }

        public void setThursday(boolean thursday) {
            this.thursday = thursday;
        }

        public boolean isFriday() {
            return friday;
        }

        public void setFriday(boolean friday) {
            this.friday = friday;
        }

        public boolean isSaturday() {
            return saturday;
        }

        public void setSaturday(boolean saturday) {
            this.saturday = saturday;
        }

        public boolean isSunday() {
            return sunday;
        }

        public void setSunday(boolean sunday) {
            this.sunday = sunday;
        }

        public int getTimingType() {
            return timingType;
        }

        public void setTimingType(int timingType) {
            this.timingType = timingType;
        }

        public boolean isReverse() {
            return isReverse;
        }

        public void setReverse(boolean reverse) {
            isReverse = reverse;
        }

        public String getDeviceSerialNo() {
            return deviceSerialNo;
        }

        public void setDeviceSerialNo(String deviceSerialNo) {
            this.deviceSerialNo = deviceSerialNo;
        }

        public String getStateName() {
            return stateName;
        }

        public void setStateName(String stateName) {
            this.stateName = stateName;
        }

        public String getStateValue() {
            return stateValue;
        }

        public void setStateValue(String stateValue) {
            this.stateValue = stateValue;
        }

        public int getLogicType() {
            return logicType;
        }

        public void setLogicType(int logicType) {
            this.logicType = logicType;
        }

        public int getBeginValue() {
            return beginValue;
        }

        public void setBeginValue(int beginValue) {
            this.beginValue = beginValue;
        }

        public int getEndValue() {
            return endValue;
        }

        public void setEndValue(int endValue) {
            this.endValue = endValue;
        }

        public int getAriGradeType() {
            return ariGradeType;
        }

        public void setAriGradeType(int ariGradeType) {
            this.ariGradeType = ariGradeType;
        }

        public double getLongitude() {
            return longitude;
        }

        public void setLongitude(double longitude) {
            this.longitude = longitude;
        }

        public double getLatitude() {
            return latitude;
        }

        public void setLatitude(double latitude) {
            this.latitude = latitude;
        }

        public int getScopeLong() {
            return scopeLong;
        }

        public void setScopeLong(int scopeLong) {
            this.scopeLong = scopeLong;
        }

        public int getSunPositionType() {
            return sunPositionType;
        }

        public void setSunPositionType(int sunPositionType) {
            this.sunPositionType = sunPositionType;
        }

        public int getTimeLong() {
            return timeLong;
        }

        public void setTimeLong(int timeLong) {
            this.timeLong = timeLong;
        }

        public int getToMinute() {
            return toMinute;
        }

        public void setToMinute(int toMinute) {
            this.toMinute = toMinute;
        }

        public int getToHour() {
            return toHour;
        }

        public void setToHour(int toHour) {
            this.toHour = toHour;
        }

        public int getTimeTypeId() {
            return timeTypeId;
        }

        public void setTimeTypeId(int timeTypeId) {
            this.timeTypeId = timeTypeId;
        }

        public int getSunTypeId() {
            return sunTypeId;
        }

        public void setSunTypeId(int sunTypeId) {
            this.sunTypeId = sunTypeId;
        }

        public int getToSunTypeId() {
            return toSunTypeId;
        }

        public void setToSunTypeId(int toSunTypeId) {
            this.toSunTypeId = toSunTypeId;
        }
        //        public int getWeatherTypeXor() {
//            return weatherTypeXor;
//        }
//
//        public void setWeatherTypeXor(int weatherTypeXor) {
//            this.weatherTypeXor = weatherTypeXor;
//        }
//
//        public int getWeatherChildrenTypeXor() {
//            return weatherChildrenTypeXor;
//        }
//
//        public void setWeatherChildrenTypeXor(int weatherChildrenTypeXor) {
//            this.weatherChildrenTypeXor = weatherChildrenTypeXor;
//        }

        public List<WeatherValueBean> getWeatherKeyValue() {
            return weatherKeyValue;
        }

        public void setWeatherKeyValue(List<WeatherValueBean> weatherKeyValue) {
            this.weatherKeyValue = weatherKeyValue;
        }

        public int getConditionTypeId() {
            return conditionTypeId;
        }

        public void setConditionTypeId(int conditionTypeId) {
            this.conditionTypeId = conditionTypeId;
        }

        public int getActionTypeId() {
            return actionTypeId;
        }

        public void setActionTypeId(int actionTypeId) {
            this.actionTypeId = actionTypeId;
        }

        public int getOperatorTypeId() {
            return operatorTypeId;
        }

        public void setOperatorTypeId(int operatorTypeId) {
            this.operatorTypeId = operatorTypeId;
        }

        public int getGroupNum() {
            return groupNum;
        }

        public void setGroupNum(int groupNum) {
            this.groupNum = groupNum;
        }
    }

    public static class LinkageTask {
        private String taskSerialNo;
        private String taskDeviceGroupInstructSerialNo;
        private String linkageSettingsId;
        private String imageUrl;
        private String briefing;
        private int sort;
        //1设备指令、2延时、3发送消息、4联动启停、5一键场景
        private int taskType;
        private int code;
        //延时
        private int longTime;

        //设备动作
        private String deviceSerialNo;
        private String deviceGroupSerialNo;
        private String deviceType;
        private int triggerTime;
        private DeviceStateDataDTO deviceStateData;
        private DeviceStateDataDTO stateData;

        //消息推送
        private String message;
        private String title;
        private List<SubMessagePeople> subMessagePeople;

        //场景
        private List<Scene> sceneList;

        //联动
        private List<LinkageStartStop> linkageStartStop;

        public String getTaskSerialNo() {
            return taskSerialNo;
        }

        public void setTaskSerialNo(String taskSerialNo) {
            this.taskSerialNo = taskSerialNo;
        }

        public String getTaskDeviceGroupInstructSerialNo() {
            return taskDeviceGroupInstructSerialNo;
        }

        public void setTaskDeviceGroupInstructSerialNo(String taskDeviceGroupInstructSerialNo) {
            this.taskDeviceGroupInstructSerialNo = taskDeviceGroupInstructSerialNo;
        }

        public String getLinkageSettingsId() {
            return linkageSettingsId;
        }

        public void setLinkageSettingsId(String linkageSettingsId) {
            this.linkageSettingsId = linkageSettingsId;
        }

        public String getImageUrl() {
            return BuildConfig.APP_RESOURCE_BASE + ThemeUtil.getIconThemeSuffix() + imageUrl + "_linkage.png";
        }

        public void setImageUrl(String imageUrl) {
            this.imageUrl = imageUrl;
        }

        public String getBriefing() {
            return briefing;
        }

        public void setBriefing(String briefing) {
            this.briefing = briefing;
        }

        public int getSort() {
            return sort;
        }

        public void setSort(int sort) {
            this.sort = sort;
        }

        public int getTaskType() {
            return taskType;
        }

        public void setTaskType(int taskType) {
            this.taskType = taskType;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public int getLongTime() {
            return longTime;
        }

        public void setLongTime(int longTime) {
            this.longTime = longTime;
        }

        public String getDeviceSerialNo() {
            return deviceSerialNo;
        }

        public void setDeviceSerialNo(String deviceSerialNo) {
            this.deviceSerialNo = deviceSerialNo;
        }

        public String getDeviceGroupSerialNo() {
            return deviceGroupSerialNo;
        }

        public void setDeviceGroupSerialNo(String deviceGroupSerialNo) {
            this.deviceGroupSerialNo = deviceGroupSerialNo;
        }

        public String getDeviceType() {
            return deviceType;
        }

        public void setDeviceType(String deviceType) {
            this.deviceType = deviceType;
        }

        public int getTriggerTime() {
            return triggerTime;
        }

        public void setTriggerTime(int triggerTime) {
            this.triggerTime = triggerTime;
        }

        public DeviceStateDataDTO getDeviceStateData() {
            return deviceStateData;
        }

        public void setDeviceStateData(DeviceStateDataDTO deviceStateData) {
            this.deviceStateData = deviceStateData;
        }

        public DeviceStateDataDTO getStateData() {
            return stateData;
        }

        public void setStateData(DeviceStateDataDTO stateData) {
            this.stateData = stateData;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public List<SubMessagePeople> getSubMessagePeople() {
            return subMessagePeople;
        }

        public void setSubMessagePeople(List<SubMessagePeople> subMessagePeople) {
            this.subMessagePeople = subMessagePeople;
        }

        public List<Scene> getSceneList() {
            return sceneList;
        }

        public void setSceneList(List<Scene> sceneList) {
            this.sceneList = sceneList;
        }

        public List<LinkageStartStop> getLinkageStartStop() {
            return linkageStartStop;
        }

        public void setLinkageStartStop(List<LinkageStartStop> linkageStartStop) {
            this.linkageStartStop = linkageStartStop;
        }

        public static class DeviceStateDataDTO {
            private Map<String, String> status;

            public DeviceStateDataDTO(Map<String, String> status) {
                this.status = status;
            }

            public Map<String, String> getStatus() {
                return status;
            }

            public void setStatus(Map<String, String> status) {
                this.status = status;
            }
        }

        public static class Scene {
            private String id;
            private String serialNo;
            private String taskSceneId;
            private String sceneSerialNo;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getSerialNo() {
                return serialNo;
            }

            public void setSerialNo(String serialNo) {
                this.serialNo = serialNo;
            }

            public String getTaskSceneId() {
                return taskSceneId;
            }

            public void setTaskSceneId(String taskSceneId) {
                this.taskSceneId = taskSceneId;
            }

            public String getSceneSerialNo() {
                return sceneSerialNo;
            }

            public void setSceneSerialNo(String sceneSerialNo) {
                this.sceneSerialNo = sceneSerialNo;
            }
        }
    }
}
